<%@ page contentType="text/html;charset=UTF-8"%>
<%//@include file="../../common/sessionValidate.jsp" %>
<%@ taglib prefix="ckeditor" uri="http://ckeditor.com" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
  <head>
    <title>新闻信息维护</title>
    <%@ include file="meta.jsp"%>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9">
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen"  id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>js/toastr/toastr.css">
    <link rel="stylesheet" href="<%=basePath%>css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css">
    <script type="text/javascript" src="<%= basePath %>js/jquery.cookie.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/ckfinder/ckfinder.js"></script>
    
	<link type="text/css" rel="stylesheet" href="<%=basePath%>js/ckeditor/contents.css" />
  </head>
  <style>
hr {
    margin-top:1px;
    border-bottom: 1px solid #1BBC9B;
}
  </style>
  <body>
  <form class="form-horizontal form-bordered form-row-strippe" name="ffAdd" id="ffAdd" mentod="post" role="form" data-toggle="validator" enctype="multipart/form-data">
  <div class="" style="margin-right:2px;padding-right:1px;">

   <!-------------------------- 面板  start--------------------------------->
	<div class="panel panel-primary" >
	  <div class="panel-heading clearfix"  id="addHeaderDiv">
	  </div>
	  <div class="panel-body">
           <div class="row" >
                <h5>&nbsp;&nbsp;基本信息
                <span class="text-right pull-right" id="buttonDivTB"></span>&nbsp;&nbsp;&nbsp;&nbsp;
                </h5>
	            <hr>
	            <!--start 换列
            	<div class="col-xs-12">
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">栏目</label>
                            <div class="col-xs-10">
                                <select id="level1" name="level1" onChange="init2()" class="form-control">
                                	<option value="">----------</option>                            	
                                </select>                             
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">子栏目</label>
                            <div class="col-xs-10">
                                <select id="level2" name="level2" class="form-control">
                                	<option value="">----------</option>                            	
                                </select>                                
                            </div>
                        </div>
                    </div>                    
                </div>
                -->
                <!--end 换列--><!--start 换列-->
                <div class="col-xs-12">
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2"><strong><font color="red">*</font>标题</label>
                            <div class="col-xs-10">
                                <textarea id="title" name="title" class="form-control" placeholder="请输入标题信息！" ></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">颜色</label>
                            <div class="col-xs-10">
                                <input id="color" name="color" type="text" value="" class="form-control" placeholder="" onclick="" />
	                            <script type="text/javascript">
	                            $(function(){
	                                $("#color").colorpicker({
	                                    fillcolor:true
	                                });
	                            });    
	                            </script>
	                            <input id="content" name="content" type="hidden" />
                                <input id="id" name="id" type="hidden" /> 
                                <input id="status" name="status" type="hidden" /> 
								<input id="types" name="types" type="hidden" value="V"/>   
  
                            </div>
                        </div>
                    </div>                    
                </div><!--end 换列--><!--start 换列-->
             	<div class="col-xs-12">
                    <div class="col-xs-12">
                        <div class="form-group">
                            <label class="control-label col-xs-1">所属栏目</label>
                            <div class="col-xs-11" id="level2Div">
                                                                	                              
                            </div>
                        </div>
                    </div>                    
                </div>               
                <div class="col-xs-12">   
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">点击率</label>
                            <div class="col-xs-10">
                                <input id="hticount" name="hticount" type="text" value="1" class="form-control" placeholder="hticount" />
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">来源</label>
                            <div class="col-xs-10">
                                <input id="newfrom" name="newfrom" type="text" class="form-control" placeholder="请输入来源信息！" />
                            </div>
                        </div>
                    </div>
				</div><!--end 换列--><!--start 换列-->                
               <div class="col-xs-12">   
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">是否显示</label>
                            <div class="col-xs-10">
                                <select id="ranger" name="ranger" class="form-control">
                                	<option value="1">是</option>
                                	<option value="0">否</option>                                	
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">显示顺序</label>
                            <div class="col-xs-10">
                                <input id="shownum" name="shownum" value="1" type="text" class="form-control" placeholder="" />
                            </div>
                        </div>
                    </div>
				</div><!--end 换列--><!--start 换列-->                

                <div class="col-xs-12">   
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">作者</label>
                            <div class="col-xs-10">
                                <input id="zg" name="zg" type="text"  value="<%=request.getSession().getAttribute("FREE_CURRENT_USER") %>" class="form-control" placeholder="zg" />
                            </div>
                        </div>
                    </div> 
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">错情</label>
                            <div class="col-xs-10">
                                <select id="cq" name="cq" class="form-control">
                                	<option value="0">否</option>  
                                	<option value="1">是</option>                              	
                                </select>                            
                            </div>
                        </div>
                    </div>                           
				</div><!--end 换列--><!--start 换列      -->               
                <div class="col-xs-12">                    
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">录入人</label>
                            <div class="col-xs-10">
                                <input id="creater" name="creater" type="text" value="<%=request.getSession().getAttribute("FREE_CURRENT_USER") %>" class="form-control" placeholder="" readonly="true"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">录入时间</label>
                            <div class="col-xs-10">
                                <input id="creattime" name="creattime" type="text" class="form-control" placeholder="" readonly="true"/>
                            </div>
                        </div>
                    </div>
				</div><!--end 换列--><!--start 换列-->
                <div class="col-xs-12">                    
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2"><strong><font color="red">*</font>截图</label>
                            <div class="col-xs-10">
                                <input id="ext7" name="ext7" type="text" value="" class="form-control" onclick="javascript:window.open('<%=basePath%>commonFileUpload2.jsp?pw_id=ext7','','status=yes,scrollbars=yes,location=no,top=300,left=500,width=420,height=250')" placeholder="请点击此处选择上传内容！" readonly="true"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2"><strong><font color="red">*</font>视频</label>
                            <div class="col-xs-10">
                                <input id="imagepath" name="imagepath" type="text" class="form-control"  onclick="javascript:window.open('<%=basePath%>commonFileUpload.jsp?pw_id=imagepath','','status=yes,scrollbars=yes,location=no,top=300,left=500,width=420,height=250')"  placeholder="请点击此处选择上传内容！" readonly="true"/>
                            </div>
                        </div>
                    </div>
				</div><!--end 换列--><!--start 换列-->
                <div class="col-xs-12">   
                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="control-label col-xs-2">新闻日期</label>
                            <div class="col-xs-10">
                                <input id="newdate" name="newdate" type="text" class="form-control" placeholder="请选择日期"  onclick='SelectDate(this)' readonly='true'/>
                            </div>
                        </div>
                    </div>    
				</div>
				
				<!--end 换列--><!--start 换列-->                    
          	
          		<div class="col-xs-12">
					<!--<div class="col-xs-12">start 换列-->
                	<div class="col-xs-12">
                      <div class="form-group">
                        <label class="control-label col-xs-1"><strong><font color="red">*</font>内容</label>
                        <div class="col-xs-11">
                            <div class="form-group">
								<textarea id="editor1" name="editor1" rows="5" cols="80"></textarea>
								<script type="text/javascript">							
								if ( typeof CKEDITOR == 'undefined' ){
									document.write('ckeditor配置错误！') ;
								}else{
									var editor = CKEDITOR.replace( 'editor1' );
									editor.setData( '' );
									CKFinder.setupCKEditor( editor, 'js/ckfinder/' ) ;
								}
								CKEDITOR.replace( 'textarea_id',{
									//skin : 'office2003', 
								});
								</script>                   
               				</div>
                         </div>
                     </div>
                 </div>                                 
              </div><!-- end 内容 -->
                   
       </div><!--end body-->
	   <div class="modal-footer bg-info " id='buttonDiv'>
	   </div>
    </div>
    <!--------------------------面板 end------------------------------------>
  </div>
  </form>
  </body>
</html>

<script src="<%=basePath%>js/bootstrap.min.js"></script>
<!--<script src="<%=basePath%>js/jquery-1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrapValidator.js"></script>-->
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/toastr/toastr.js"></script>
<script src="<%=basePath%>js/bootbox.js"></script>
<script src="<%=basePath%>js/jquery.validate.js"></script>
<!-- <script src="<%=basePath%>js/additional-methods.min.js"></script> -->
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%= basePath %>js/tableSortTool.js" ></script>
<script src="<%= basePath %>js/calendar.js" ></script>
<script src="<%= basePath %>js/jquery.colorpicker.js"></script> 
    
<script type="text/javascript">
//新增保存数据
function add() {
	var content = CKEDITOR.instances.editor1.getData();
	if(content==""||content==null){
		alert("内容不能为空！");
		return false;   
	}else{
		$("#content").val(content);		
	}
	
	$("#addSaveButton").attr("disabled", true);
	var url = "<%=basePath%>t_news/saveT_news?time="+Math.random();
	var postData = $("#ffAdd").serializeArray();
	//alert(postData);
    $.post(url, postData, function (data) {
    	//var data = $.parseJSON(data);
        if (data.result=="success") {
            //保存成功  1.关闭弹出层，
          	showSuccessTips("恭喜保存成功!", "提示");
          	//history.goBack();
        }
        else {
            $("#addSaveButton").removeAttr("disabled");
        	showErrorTips("保存数据失败!", "错误信息：");
        	return false;
        }
    }).error(function () {
        $("#addSaveButton").removeAttr("disabled");
    	showErrorTips("保存数据失败!", "错误信息：");
    });
}

//更新修改数据到后台
function edit(){
	//alert("进入edit（）方法！");
	var content = CKEDITOR.instances.editor1.getData();
	if(content==""||content==null){
		alert("内容不能为空！");
		return false;   
	}else{
		$("#content").val(content);		
	}
	$("#editSaveButton").attr("disabled", true);
	var url = "<%=basePath%>t_news/updateT_news?time="+Math.random();
	//alert(url);
	myEdit2(url);
}

//设置checkbox的值为选中状态；
function setLevel2Checkbox(level2value){
	var subs = level2value.split(",");
	//alert("subs="+subs);
    $(subs).each(function (i,ccccdom){
    	//alert("选中的checkbox="+dom);
    	//设置值value=dom值得选中状态；
    	//$("input:checkbox[value='"+dom+"']").attr("check",true);
    	//$(":checkbox[value='"+dom+"']").prop("checked",true);
    	$("input:checkbox[id='"+ccccdom+"']").prop("checked",true);	
    });
    //alert("77777777777");
    //alert("setLevel2Checkbox opType ="+$("#opType").val());
}

//初始化栏目div
function initLevel2(){
	//初始化 level2；
    var purl2 = "<%=basePath%>t_channel/getAllT_channelLevel?channellevel=2&startIndex=0&pageSize=1000&time="+ Math.random();
	//alert(purl2);
	$.ajaxSettings.async = false; //设置为同步，否则会有部分数据没出来
	$.getJSON(purl2, function(data) {
		//alert("data="+data.items);
		var checkboxeHtml = "";
		$.each(data.items, function(i, item) {
			checkboxeHtml+= "<input type='checkbox' id='"+item.channelid+"' name='level2' value='"+item.channelid+"'>"+item.channelid+"--"+item.channelname+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		});//end each
		//alert(checkboxeHtml);
		$("#level2Div").html(checkboxeHtml);
	}); //end getJson	
}

//初始化页面及校验
$().ready(function(){
	//alert("11111111111");
	//1、初始化数据显示
	var optype ='<%=request.getParameter("oplx")%>';
	//alert("optype="+optype);
	var id='<%=request.getParameter("id")%>';
	var functname= "视频文章" ;//'<%=request.getParameter("functname")%>';
	var functid='<%=request.getParameter("functid")%>';
	var name = functname; //"新闻";
	
	//初始化level1、level2；
	//init1();
	//init2();
	
	//alert("optype="+optype+";id="+id);
	if(optype=='add'){
		$("#ffAdd")[0].reset();/*重置表单*/
	    var basePath="<i class='icon-plus'></i>&nbsp;";
		setHeader2("添加新"+functname, basePath);//设置addHeaderDiv标题文字及按钮
		setButtonDivAdd2();//设置底部adddiv的 操作按钮
		initLevel2();
		
		//setButtonDivAdd3();//设置上部adddiv的 操作按钮
		initTime("newdate", "2");
		initTime("creattime", "1");
		//alert("functname="+functname+";functid="+functid);
		//$("#level1").val(functid);
		//$("#level1name").val(functname);
		//alert("add opType init="+$("#opType").val());
		
	}else if(optype=='edit'){
		//alert("进入初始化edit方法");
		var basePath="<i class='icon-pencil'></i>&nbsp;";
		setHeader2("修改"+functname, basePath);//设置addHeaderDiv标题文字及按钮
		setButtonDivEdit2();//设置adddiv的 操作按钮
		initLevel2();
		//$("#opType").val("editSubmit");
		//alert("edit opType init="+$("#opType").val());
		
		//setButtonDivEdit3();//设置上部adddiv的 操作按钮
	   	var url = "<%=basePath%>t_news/getT_news?id="+id+"&time="+Math.random();
		//$.ajaxSettings.async = false; //设置为同步，否则会有部分数据没出来
	    $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
	    	setValue(data);
	    	//$("#editor1").val(data.content);
	    	CKEDITOR.instances.editor1.setData(data.content);
	    	//alert("data.level2="+data.level2);
	    	if(data.level2!=null){
	    		//此处如果不判断null，会造成修改时提交失败；
	    		setLevel2Checkbox(data.level2);
	    	}	    	
	    	//alert("88888888888");
	    	//alert($("#effect_date").val()+""+jsonDateFormat($("#effect_date").val()));
	    	//$("#effect_date").val(jsonDateFormat($("#effect_date").val())); //重新设置日期类型的值
	    });
	}else if(optype=='view'){
		var basePath="<i class='icon-eye-open'></i>&nbsp;";//设置addHeaderDiv标题文字及按钮
		setHeader2("查看"+functname, basePath);
		setButtonDivView2();//设置adddiv的 操作按钮
		//setButtonDivView4();//设置adddiv的 操作按钮
		initLevel2();
	   	var url = "<%=basePath%>t_news/getT_news?id="+id+"&time="+Math.random();
		//$.ajaxSettings.async = false; //设置为同步，否则会有部分数据没出来
	    $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
	    	setValue(data);
	    	CKEDITOR.instances.editor1.setData(data.content);
	    	setLevel2Checkbox(data.level2);
	    	//alert($("#effect_date").val()+""+jsonDateFormat($("#effect_date").val()));
	    	//$("#effect_date").val(jsonDateFormat($("#effect_date").val())); //重新设置日期类型的值
	    });
	    formReadOnly('ffAdd');//设置表单不可修改
	}
	//alert(" after allinit opType="+$("#opType").val());
	//2、校验脚本初始化，start check
	$("#ffAdd").validate({
		submitHandler:function(form){
			//alert("opType="+$("#opType").val());
            if($("#opType").val()=="add"){
            	add();
            }else if($("#opType").val()=="edit"){           	
            	edit();
            }
	    },
		rules: {
			id: {
			    //required: true,
                digits: true,
			    //minlength: 1,
			    maxlength: 11
    		},
			types: {
			    //required: true,
			    maxlength: 45
    		},
			title: {
			    required: true,
			    maxlength: 256
    		},
			creater: {
			    //required: true,
			    maxlength: 45
    		},
			updater: {
			    //required: true,
			    maxlength: 45
    		},
			publisher: {
			    //required: true,
			    maxlength: 45
    		},
			creattime: {
			    //required: true,
			    maxlength: 45
    		},
			updattime: {
			    //required: true,
			    maxlength: 45
    		},
			publishtime: {
			    //required: true,
			    maxlength: 45
    		},
			checker: {
			    //required: true,
			    maxlength: 45
    		},
			checktime: {
			    //required: true,
			    maxlength: 45
    		},
			hticount: {
			    //required: true,
			    maxlength: 45
    		},
			newfrom: {
			    //required: true,
			    maxlength: 256
    		},
			color: {
			    //required: true,
			    maxlength: 45
    		},
			size: {
			    //required: true,
			    maxlength: 45
    		},
			zg: {
			    //required: true,
			    maxlength: 128
    		},
			cq: {
			    //required: true,
			    maxlength: 512
    		},
			content: {
			    //required: true,
			    maxlength: 6000
    		},
			memo: {
			    //required: true,
			    maxlength: 1024
    		},
			ext1: {
			    //required: true,
			    maxlength: 45
    		},
			ext2: {
			    //required: true,
			    maxlength: 45
    		},
			ext3: {
			    //required: true,
			    maxlength: 45
    		},
			ext4: {
			    //required: true,
			    maxlength: 256
    		},
			ext5: {
			    //required: true,
			    maxlength: 256
    		},
			ext6: {
			    //required: true,
			    maxlength: 256
    		},
			ext7: {
			    required: true,
			    maxlength: 512
    		},
			ext8: {
			    //required: true,
			    maxlength: 512
    		},
			ext9: {
			    //required: true,
			    maxlength: 512
    		},
			status: {
			    //required: true,
			    maxlength: 45
    		},
			check2: {
			    //required: true,
			    maxlength: 45
    		},
			classes: {
			    //required: true,
			    maxlength: 45
    		},
			checkstatus: {
			    //required: true,
			    maxlength: 45
    		},
			link: {
			    //required: true,
			    maxlength: 512
    		},
			newdate: {
			    //required: true,
			    maxlength: 45
    		},
			descriptions: {
			    //required: true,
			    maxlength: 1024
    		},
			level1: {
			    //required: true,
			    maxlength: 45
    		},
			level2: {
			    //required: true,
			    maxlength: 45
    		},
			level3: {
			    //required: true,
			    maxlength: 45
    		},
			level1name: {
			    //required: true,
			    maxlength: 45
    		},
			level2name: {
			    //required: true,
			    maxlength: 45
    		},
			level3name: {
			    //required: true,
			    maxlength: 45
    		},
			imagepath: {
			    //required: true,
			    maxlength: 512
    		},
			shownum: {
			    //required: true,
                digits: true,
			    //minlength: 1,
			    maxlength: 11
    		},
			ranger: {
			    //required: true,
			    maxlength: 45
    		}
	    }, //end rules;
	    messages: {
			id: {
			    //required: "主键不能为空！",
                digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
			    //minlength: "<font color='red'>最少输入1位！</font>",
			    maxlength: "<font color='red'>主键最大支持11位，输入的数据已经超过最大长度！</font>"
    		},
			types: {
			    maxlength: "<font color='red'>新闻类型最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			title: {
				required: "<font color='red'>标题不能为空！</font>",
			    maxlength: "<font color='red'>标题最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			creater: {
			    maxlength: "<font color='red'>录入人最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			updater: {
			    maxlength: "<font color='red'>更新人最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			publisher: {
			    maxlength: "<font color='red'>发布人最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			creattime: {
			    maxlength: "<font color='red'>录入时间最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			updattime: {
			    maxlength: "<font color='red'>更新时间最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			publishtime: {
			    maxlength: "<font color='red'>发布时间最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			checker: {
			    maxlength: "<font color='red'>审核人最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			checktime: {
			    maxlength: "<font color='red'>审核时间最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			hticount: {
			    maxlength: "<font color='red'>点击率最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			newfrom: {
			    maxlength: "<font color='red'>来源最大支持256位,输入的数据已经超过最大长度！</font>"
    		},
			color: {
			    maxlength: "<font color='red'>颜色最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			size: {
			    maxlength: "<font color='red'>标题字体最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			zg: {
			    maxlength: "<font color='red'>撰稿摄影最大支持128位,输入的数据已经超过最大长度！</font>"
    		},
			cq: {
			    maxlength: "<font color='red'>错情最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			content: {
			    maxlength: "<font color='red'>内容最大支持6,000位,输入的数据已经超过最大长度！</font>"
    		},
			memo: {
			    maxlength: "<font color='red'>备注最大支持1,024位,输入的数据已经超过最大长度！</font>"
    		},
			ext1: {
			    maxlength: "<font color='red'> ext1最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			ext2: {
			    maxlength: "<font color='red'> ext2最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			ext3: {
			    maxlength: "<font color='red'> ext3最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			ext4: {
			    maxlength: "<font color='red'> ext4最大支持256位,输入的数据已经超过最大长度！</font>"
    		},
			ext5: {
			    maxlength: "<font color='red'> ext5最大支持256位,输入的数据已经超过最大长度！</font>"
    		},
			ext6: {
			    maxlength: "<font color='red'> ext6最大支持256位,输入的数据已经超过最大长度！</font>"
    		},
			ext7: {
			    required: "<font color='red'>视频不能为空！</font>",
			    maxlength: "<font color='red'> 视频最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			ext8: {
			    maxlength: "<font color='red'> ext8最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			ext9: {
			    maxlength: "<font color='red'> ext9最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			status: {
			    maxlength: "<font color='red'>状态最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			check2: {
			    maxlength: "<font color='red'>复核人最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			classes: {
			    maxlength: "<font color='red'>扩展类型最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			checkstatus: {
			    maxlength: "<font color='red'>审核状态最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			link: {
			    maxlength: "<font color='red'>链接地址最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			newdate: {
			    maxlength: "<font color='red'>新闻日期最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			descriptions: {
			    maxlength: "<font color='red'>说明最大支持1,024位,输入的数据已经超过最大长度！</font>"
    		},
			level1: {
			    maxlength: "<font color='red'>栏目1级最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			level2: {
			    maxlength: "<font color='red'>栏目2级最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			level3: {
			    maxlength: "<font color='red'>栏目3级最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			level1name: {
			    maxlength: "<font color='red'> level1name最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			level2name: {
			    maxlength: "<font color='red'> level2name最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			level3name: {
			    maxlength: "<font color='red'> level3name最大支持45位,输入的数据已经超过最大长度！</font>"
    		},
			imagepath: {
			    required: "<font color='red'>截图不能为空！</font>",
			    maxlength: "<font color='red'>截图最大支持512位,输入的数据已经超过最大长度！</font>"
    		},
			shownum: {
			    //required: "显示顺序不能为空！",
                digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
			    //minlength: "<font color='red'>最少输入1位！</font>",
			    maxlength: "<font color='red'>显示顺序最大支持11位，输入的数据已经超过最大长度！</font>"
    		},
			ranger: {
			    maxlength: "<font color='red'>范围最大支持45位,输入的数据已经超过最大长度！</font>"
    		}
	   } //end message;
   	}); //end validate;
}) //end funciton read;
</script>
